package com.zhaojindong.ioc.component.register.first;

import lombok.extern.log4j.Log4j;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;


/**
 * @RunWith(SpringJUnit4ClassRunner.class)
 *     function: auto create container
 * @ContextConfiguration(classes = FirstConfig.class)
 */
@Log4j
public class FirstTest {

    @Test
    public void testMethod() {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(FirstConfig.class);

        String[] names = context.getBeanDefinitionNames();
        for (String name : names) {
            log.info("bean name: " + name);
        }
    }
}